home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / exthandler / nsIHelperAppLauncherDialog.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  138 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIHelperAppLauncherDialog.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIHelperAppLauncherDialog_h__
  6. #define __gen_nsIHelperAppLauncherDialog_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIHelperAppLauncher; /* forward declaration */
  18.  
  19. class nsILocalFile; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsIHelperAppLauncherDialog */
  23. #define NS_IHELPERAPPLAUNCHERDIALOG_IID_STR "64355793-988d-40a5-ba8e-fcde78cac631"
  24.  
  25. #define NS_IHELPERAPPLAUNCHERDIALOG_IID \
  26.   {0x64355793, 0x988d, 0x40a5, \
  27.     { 0xba, 0x8e, 0xfc, 0xde, 0x78, 0xca, 0xc6, 0x31 }}
  28.  
  29. /**
  30.  * This interface is used to display a confirmatino dialog before
  31.  * launching a "helper app" to handle content not handled by
  32.  * Mozilla.
  33.  *
  34.  * Usage:  Clients (of which there is one: the nsIExternalHelperAppService
  35.  * implementation in mozilla/uriloader/exthandler) create an instance of
  36.  * this interface (using the contract ID) and then call the show() method.
  37.  *
  38.  * The dialog is shown non-modally.  The implementation of the dialog
  39.  * will access methods of the nsIHelperAppLauncher passed in to show()
  40.  * in order to cause a "save to disk" or "open using" action.
  41.  */
  42. class NS_NO_VTABLE nsIHelperAppLauncherDialog : public nsISupports {
  43.  public: 
  44.  
  45.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHELPERAPPLAUNCHERDIALOG_IID)
  46.  
  47.   /**
  48.    * This request is passed to the helper app dialog because Gecko can not
  49.    * handle content of this type.
  50.    */
  51.   enum { REASON_CANTHANDLE = 0U };
  52.  
  53.   /**
  54.    * The server requested external handling.
  55.    */
  56.   enum { REASON_SERVERREQUEST = 1U };
  57.  
  58.   /**
  59.    * Gecko detected that the type sent by the server (e.g. text/plain) does
  60.    * not match the actual type.
  61.    */
  62.   enum { REASON_TYPESNIFFED = 2U };
  63.  
  64.   /* void show (in nsIHelperAppLauncher aLauncher, in nsISupports aContext, in unsigned long aReason); */
  65.   NS_IMETHOD Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext, PRUint32 aReason) = 0;
  66.  
  67.   /* nsILocalFile promptForSaveToFile (in nsIHelperAppLauncher aLauncher, in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension); */
  68.   NS_IMETHOD PromptForSaveToFile(nsIHelperAppLauncher *aLauncher, nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval) = 0;
  69.  
  70. };
  71.  
  72. /* Use this macro when declaring classes that implement this interface. */
  73. #define NS_DECL_NSIHELPERAPPLAUNCHERDIALOG \
  74.   NS_IMETHOD Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext, PRUint32 aReason); \
  75.   NS_IMETHOD PromptForSaveToFile(nsIHelperAppLauncher *aLauncher, nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval); 
  76.  
  77. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  78. #define NS_FORWARD_NSIHELPERAPPLAUNCHERDIALOG(_to) \
  79.   NS_IMETHOD Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext, PRUint32 aReason) { return _to Show(aLauncher, aContext, aReason); } \
  80.   NS_IMETHOD PromptForSaveToFile(nsIHelperAppLauncher *aLauncher, nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval) { return _to PromptForSaveToFile(aLauncher, aWindowContext, aDefaultFile, aSuggestedFileExtension, _retval); } 
  81.  
  82. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  83. #define NS_FORWARD_SAFE_NSIHELPERAPPLAUNCHERDIALOG(_to) \
  84.   NS_IMETHOD Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext, PRUint32 aReason) { return !_to ? NS_ERROR_NULL_POINTER : _to->Show(aLauncher, aContext, aReason); } \
  85.   NS_IMETHOD PromptForSaveToFile(nsIHelperAppLauncher *aLauncher, nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptForSaveToFile(aLauncher, aWindowContext, aDefaultFile, aSuggestedFileExtension, _retval); } 
  86.  
  87. #if 0
  88. /* Use the code below as a template for the implementation class for this interface. */
  89.  
  90. /* Header file */
  91. class nsHelperAppLauncherDialog : public nsIHelperAppLauncherDialog
  92. {
  93. public:
  94.   NS_DECL_ISUPPORTS
  95.   NS_DECL_NSIHELPERAPPLAUNCHERDIALOG
  96.  
  97.   nsHelperAppLauncherDialog();
  98.  
  99. private:
  100.   ~nsHelperAppLauncherDialog();
  101.  
  102. protected:
  103.   /* additional members */
  104. };
  105.  
  106. /* Implementation file */
  107. NS_IMPL_ISUPPORTS1(nsHelperAppLauncherDialog, nsIHelperAppLauncherDialog)
  108.  
  109. nsHelperAppLauncherDialog::nsHelperAppLauncherDialog()
  110. {
  111.   /* member initializers and constructor code */
  112. }
  113.  
  114. nsHelperAppLauncherDialog::~nsHelperAppLauncherDialog()
  115. {
  116.   /* destructor code */
  117. }
  118.  
  119. /* void show (in nsIHelperAppLauncher aLauncher, in nsISupports aContext, in unsigned long aReason); */
  120. NS_IMETHODIMP nsHelperAppLauncherDialog::Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext, PRUint32 aReason)
  121. {
  122.     return NS_ERROR_NOT_IMPLEMENTED;
  123. }
  124.  
  125. /* nsILocalFile promptForSaveToFile (in nsIHelperAppLauncher aLauncher, in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension); */
  126. NS_IMETHODIMP nsHelperAppLauncherDialog::PromptForSaveToFile(nsIHelperAppLauncher *aLauncher, nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval)
  127. {
  128.     return NS_ERROR_NOT_IMPLEMENTED;
  129. }
  130.  
  131. /* End of implementation class template. */
  132. #endif
  133.  
  134. #define NS_IHELPERAPPLAUNCHERDLG_CONTRACTID    "@mozilla.org/helperapplauncherdialog;1"
  135. #define NS_IHELPERAPPLAUNCHERDLG_CLASSNAME "Mozilla Helper App Launcher Confirmation Dialog"
  136.  
  137. #endif /* __gen_nsIHelperAppLauncherDialog_h__ */
  138.